import random
import string

def activation_code(N):
    """
    根据用户的输入N，生成N个由A-Z0-9组成的32位激活码

    """


    for i in range(int(N)):
        nums = ''.join(random.sample(string.ascii_uppercase + string.digits, 32))
        print(nums)
        with open("激活码.txt", "a") as fp:
            fp.write('\n' + nums)


